package com.shuzixiangcun.config;

import com.shuzixiangcun.filter.RecruitFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 描述
 *
 * @version 1.0
 * @Title:
 * @author: YANBOWEN
 * @Description:
 * @date 2024/07/08 10:43:53
 */
//@Configuration
public class RecruitFilterConfig {
    @Bean
    public RecruitFilter recruitFilter() {
        return new RecruitFilter();
    }

    @Bean(name = "recruitFilterConf")
    public FilterRegistrationBean adminFilterConfig() {
        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
        filterRegistrationBean.setFilter(recruitFilter());
        filterRegistrationBean.addUrlPatterns("/jobPostings/addJobPstings");
        filterRegistrationBean.setName("recruitFilterConf");
        return filterRegistrationBean;
    }
}
